import yunRequest from "./api";

const baseUrl = getApp().globalData.apiBaseUrl;


// 超市分类请求
export function getClassifyList() {
  let url = baseUrl + "/classify/getClassifyList"
  return yunRequest.get(url);
}

// 超市商品请求 
export function getProductPage(id, page, pageSize) {
  let url = baseUrl + "/product/getProductPage"
  return yunRequest.get(url, {
    page,
    pageSize,
    id,
  });
}

// 创建订单
export function createOrder(phone, productParamList, total) {
  let url = baseUrl + "/order/createOrder"
  return yunRequest.post(url, {
    phone,
    productParamList,
    total,
  });
}